package ro.gateway.aida.obj;

import ro.gateway.aida.db.PersistentObject;


/**
 * <p>Title: Romanian AIDA</p> <p>Description: </p> <p>Copyright: Copyright (comparator) 2003</p> <p>Company:
 * ro-gateway</p>
 *
 * @author Mihai Popoaei, mihai_popoaei@yahoo.com, smike@intellisource.ro ; Mihai Postelnicu, mihai@ro-gateway.org
 * @version 1.1-* @version $Id: Country.java,v 1.1 2004/10/24 23:37:10 mihaipostelnicu Exp $
 */
public class Country implements PersistentObject {
     private String iso3;
     private String iso2;
     private String name;
     private int cregion_id;
     private GeoData geo_data;

     public GeoData getGeo_data() {
          return geo_data;
     }

     public void setGeo_data( GeoData geo_data ) {
          this.geo_data = geo_data;
     }

     public Country( String iso3 ) {
          this.iso3 = iso3;
          geo_data = new GeoData();
     }

     public Country() {
          this.geo_data = new GeoData();
     }

     public Country( String name, String iso3 ) {
          this.name = name;
          this.iso3 = iso3;
     }

     public Country( String name, String iso3, String iso2, int cregion_id ) {
          this.name = name;
          this.iso3 = iso3;
          this.cregion_id = cregion_id;
          this.iso2 = iso2;
     }

     public int getCregion_id() {
          return cregion_id;
     }

     public void setCregion_id( int cregion_id ) {
          this.cregion_id = cregion_id;
     }

     public void setName( String name ) {
          this.name = name;
     }

     public void setIso2( String iso2 ) {
          this.iso2 = iso2;
     }

     public void setIso3( String iso3 ) {
          this.iso3 = iso3;
     }

     public String getName() {
          return name;
     }

     public String getIso2() {
          return iso2;
     }

     public String getIso3() {
          return iso3;
     }

     public boolean equals( Country country ) {
          if ( iso3 == null )
               return false;
          if ( country == null ) return false;

          return iso3.equals( country.iso3 );
     }

     public static final String LIST = "Country_LIST";
}
